package com.fg.room.pojo.DTO;

import com.fg.common.annotation.valid.EnumCheck;
import com.fg.common.valid.AddStrategy;
import com.fg.common.valid.UpdateStrategy;
import com.fg.room.enums.DeviceRepairStatus;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 设备详情
 *
 * @author tongjiaqing
 * @email tongjiaqing@mail.com
 * @date 2021-04-26 10:25:24
 */
@Data
public class DeviceInfoDto {

    /**
     * 主键id
     */
    @NotNull(message = "参数:{id}不能为空", groups = {UpdateStrategy.class})
    private String id;
    /**
     * 设备名称
     */
    @NotNull(message = "参数:{设备名称}不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String name;
    /**
     * 设备类型id
     */
    @NotNull(message = "参数:{设备类型}不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String deviceTypeId;
    /**
     * ip地址
     */
    @NotNull(message = "参数:{设备ip}不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String ip;
    /**
     * 端口
     */
    @NotNull(message = "参数:{设备端口}不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private Integer port;
    /**
     * address_info表id
     */
    @NotNull(message = "参数:{设备地址}不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String addressId;
    /**
     * brand_info表id
     */
    @NotNull(message = "参数:{设备品牌}不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String brandId;
    /**
     * 设备型号
     */
    @NotNull(message = "参数:{设备型号}不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String model;
    /**
     * 供应商
     */
    @NotNull(message = "参数:{供应商}不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String supplier;
    /**
     * 供应商联系方式
     */
    @NotNull(message = "参数:{供应商联系方式}不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String supplierContact;
    /**
     * 购买时间
     */
    @NotNull(message = "参数:{购买时间}不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private LocalDateTime purchaseTime;
    /**
     * 登记时间
     */
    @NotNull(message = "参数:{登记时间}不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private LocalDateTime registerTime;
    /**
     * 到期时间
     */
    @NotNull(message = "参数:{到期时间}不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private LocalDateTime expireTime;
    /**
     * 报修状态
     */
    @EnumCheck(enumClass = DeviceRepairStatus.class,groups = {UpdateStrategy.class})
    private String repairStatus;
    /**
     * 报废状态:true  or  false
     */
    private Boolean scrapStatus;
    /**
     * 备注
     */
    private String remark;

}
